package com.zhongdone.pattern.structural.adapter.classAdapter;

/**
 * 适配器
 */
public class PowerAdapter extends AC220 implements DC5 {
    @Override
    public Integer outputDC5V() {
        Integer adapterInput = super.outputAC220V();
        Integer adapterOutput = adapterInput/44;
        System.out.println("使用Adapter输入AC"+adapterInput+"V， 输出DC"+adapterOutput+"V");
        return adapterOutput;
    }


    public static void main(String[] args) {
        DC5 dc5 = new PowerAdapter();
        dc5.outputDC5V();
    }
}
